package com.biostime.qdingding.modules.qd.dao;

import java.util.Date;
import java.util.HashMap;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.biostime.qdingding.common.mybatis.MyBatisDao;
import com.biostime.qdingding.common.persistence.CrudDao;
import com.biostime.qdingding.modules.qd.api.dto.CourseCalendarParamDto;
import com.biostime.qdingding.modules.qd.api.dto.CourseDetailDto;
import com.biostime.qdingding.modules.qd.api.dto.CourseDto;
import com.biostime.qdingding.modules.qd.api.dto.CourseOrderDto;
import com.biostime.qdingding.modules.qd.api.dto.CoursesOrderingDto;
import com.biostime.qdingding.modules.qd.api.dto.CoursesectionDto;
import com.biostime.qdingding.modules.qd.api.dto.MyCourseDto;
import com.biostime.qdingding.modules.qd.api.dto.ParentGuidanceDto;
import com.biostime.qdingding.modules.qd.entity.Course;

/**
 * 排课表Dao
 * 
 * @author phil
 * @version 2015-11-11
 */
@MyBatisDao
public interface CourseDao extends CrudDao<Course> {

	public List<Course> findListByWeek(@Param("course") Course course,@Param("start") Date start,@Param("end") Date end);
	
	public boolean getCourseReadonly(Course course);
	
	public List<HashMap<String, Object>> getCourseStudents(@Param("type") Integer type,@Param("courseId") Integer courseId);

	public List<HashMap<String, Object>> getAbortStudents(@Param("type") Integer type,@Param("courseId") Integer courseId);
	
	// <!-- ————————————————————————————楚河汉界，谁敢动我的，打死!//// ————————————————————————————————————-->	
	public CourseDetailDto apiGetCourseDetail(@Param("courseId") String courseId, @Param("studentId") String studentId,
			@Param("type") String type);

	public List<Course> apiFindList(@Param("centerId") String centerId, @Param("orderType") String orderType);

	public List<CoursesOrderingDto> apiFindCourseOrderDto(@Param("centerId") String centerId,
			@Param("orderType") String orderType, @Param("studentId") String studentId,
			@Param("serialIds") List<String> serialIds, @Param("levelIds") List<String> levelIds,
			@Param("coursedays") List<String> coursedays,
			@Param("type") String type);
	
	public List<CourseOrderDto> apiFindCourseOrderDto2(@Param("centerId") String centerId,
			@Param("orderType") String orderType, @Param("studentId") String studentId,
			@Param("serialIds") List<String> serialIds, @Param("levelIds") List<String> levelIds,
			@Param("coursedays") List<String> coursedays,
			@Param("type") String type);
	
	public List<MyCourseDto> apiCourseCalendar(CourseCalendarParamDto ccpd);
	
	public Course apiGetInOrOut(@Param("type")String type,@Param("courseId")String courseId);
	
	public List<CoursesOrderingDto> apiGetHotCourse(@Param("levelId")String levelId,@Param("centerId") String centerId
			,@Param("studentId") String studentId);
	
    public List<CourseDto> apiMyRecentCourse(@Param("studentId") String studentId);
    
    public CoursesectionDto apiGetSection(@Param("sectionId")String sectionId);
    
    public List<ParentGuidanceDto> apiGetGuidenceList(@Param("studentId") String studentId);

}
